package com.wutianyi.controller.include;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.wutianyi.module.company.Company;
import com.wutianyi.module.services.CompanyServices;

@Controller
public class IncludeController {
	
	@Autowired
	private CompanyServices companyServices;
	
	@RequestMapping("/include/header.do")
	public ModelAndView headers() {
		
		ModelAndView modelAndView = new ModelAndView("include/header");
		
		List<Company> companys = companyServices.listCompanys();
		modelAndView.addObject("companys", companys);
		
		return modelAndView;
	}
}
